@(openProjects: List[models.domain.Project], closedProjects: List[models.domain.Project])
@main(title = "Verkefni") {

    <link rel="stylesheet" href="/public/stylesheets/exams.css">


    <div class="container">
        <div class="row">
            <div class="span12">
                <h2>Öll Verkefni</h2>

                <div class="tabbable">
                    <ul class="nav nav-tabs">
                        <li class ="active"><a href ="#opid" data-toggle="tab">Opin Verkefni</a> </li>
                        <li><a href ="#lokad" data-toggle="tab">Lokuð Verkefni</a> </li>
                    </ul>
                    <div class = "tab-content">
                        <div class = "tab-pane active" id ="opid">
                            <table class="table table-striped" cellpadding="0" cellspacing="0" border="0" class="display">
                                <thead>
                                    <tr>
                                        <th>Verkefni</th>
                                        <th>Fag</th>
                                        <th>Lagt fyrir</th>
                                        <th>Skilafrestur</th>
                                        <th>Skilað/Óskilað</th>
                                        <th>Vægi</th>
                                        <th>Einkunn</th>
                                    </tr>
                                </thead>

                                <tbody>
                                    @for(project <- openProjects){
                                        <tr>
                                        <td><a href="studentOneProject/@project.getVerkefni_id"/>@project.getName</td>
                                        <td>@project.getCourse</td>
                                        <td>@project.getbeginDate()</td>
                                        <td>@project.getHandInDate</td>
                                            @if(project.getHandedIn==true){
                                                <td>Skilað</td>
                                            }
                                            @if(project.getHandedIn==false){
                                                <td>Óskilað</td>
                                            }
                                        <td>@(project.getWeight)%</td>
                                            @if(project.getGrade == 20){
                                                <td>-</td> }
                                            @if(project.getGrade < 20) {
                                                <td>@project.getGrade</td> }
                                        </tr>
                                    }
                                </tbody>

                            </table>
                        </div> <!--close div opid -->

                        <div class="tab-pane" id="lokad">

                            <table class="table table-striped" cellpadding="0" cellspacing="0" border="0" class="display">
                                <thead>
                                    <tr>
                                        <th>Verkefni</th>
                                        <th>Fag</th>
                                        <th>Lagt fyrir</th>
                                        <th>Skilafrestur</th>
                                        <th>Skilað/Óskilað</th>
                                        <th>Vægi</th>
                                        <th>Einkunn</th>
                                    </tr>
                                </thead>

                                <tbody>
                                    @for(project <- closedProjects){
                                        <tr>
                                        <td><a href="studentOneProject/@project.getVerkefni_id" style="color:black;"/>@project.getName</td>
                                        <td>@project.getCourse</td>
                                        <td>@project.getbeginDate()</td>
                                        <td>@project.getHandInDate</td>
                                            @if(project.getHandedIn==true){
                                                <td>Skilað</td>
                                            }
                                            @if(project.getHandedIn==false){
                                                <td>Óskilað</td>
                                            }
                                        <td>@(project.getWeight)%</td>
                                            @if(project.getGrade == 20){
                                                <td>-</td> }
                                            @if(project.getGrade < 20) {
                                                <td>@project.getGrade</td> }
                                        </tr>
                                    }
                                </tbody>
                            </table>
                        </div> <!--close div lokad -->
                    </div> <!--tab content -->
                </div> <!--tabbable -->
            </div>
        </div>
    </div>
}